// SearchButton.js
import React from 'react';
import { View, Text, Pressable, StyleSheet } from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';

const SearchButton = ({ navigateToSearch }) => {
  return (
    <View style={styles.searchButtonContainer}>
      <Pressable style={styles.searchButton} onPress={navigateToSearch}>
        <Icon name="search" size={24} color="#fff" />
      </Pressable>
      <Pressable onPress={navigateToSearch}>
        <Text style={styles.searchButtonText}>搜索与板块</Text>
      </Pressable>
    </View>
  );
};

const styles = StyleSheet.create({
  searchButtonContainer: {
    position: 'absolute',
    flexDirection: 'row',
    right: 10,
    bottom: 10,
    backgroundColor: '#EB7A76',
    padding: 10,
    borderRadius: 25,
    alignItems: 'center',
  },
  searchButton: {
  },
  searchButtonText: {
    color: '#fff',
    fontSize: 14,
    marginLeft: 5,
  },
});

export default SearchButton;
